package com.example.course.service.impl;

import com.example.course.bean.Register;
import com.example.course.mapper.RegisterMapper;
import com.example.course.service.RegisterService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RegisterServiceImpl implements RegisterService {
    @Resource
    private RegisterMapper registerMapper;

    @Override
    public int insertRegister(Register register) {
        return registerMapper.insertRegister(register);
    }

    @Override
    public int deleteRegister(int id) {
        return registerMapper.deleteRegister(id);
    }

    @Override
    public Register getRegister(int id) {
        return registerMapper.selectRegister(id);
    }

    @Override
    public List<Register> getRegisters() {
        return registerMapper.selectRegisters();
    }
}
